import DFlowStart from "./start/DFlowStart.vue";
import DFlowStartOption from "./start/DFlowStartOption.vue";
import DFlowStartView from "./start/DFlowStartView.vue";
import {getInitOption as flowStartInitOption, getTypeOption as flowStartGetTypeOption} from "./start/option.ts"
import DFlowEnd from "./end/DFlowEnd.vue";
import DFlowEndView from "./end/DFlowEndView.vue";
import DFlowEndOption from "./end/DFlowEndOption.vue";
import {getInitOption as flowEndInitOption, getTypeOption as flowEndGetTypeOption} from "./end/option.ts"
import DFlowRect from "./rect/DFlowRect.vue";
import DFlowRectOption from "./rect/DFlowRectOption.vue";
import DFlowRectView from "./rect/DFlowRectView.vue";
import {getInitOption as flowRectInitOption, getTypeOption as flowRectGetTypeOption} from "./rect/option.ts"
import DFlowDiamond from "./diamond/DFlowDiamond.vue";
import DFlowDiamondView from "./diamond/DFlowDiamondView.vue";
import DFlowDiamondOption from "./diamond/DFlowDiamondOption.vue";
import {getInitOption as flowDiamondInitOption, getTypeOption as flowDiamondGetTypeOption} from "./diamond/option.ts"

function registerFlowComponent(compMap: any) {
    compMap["flow.start"] = {
        label: "开始", component: DFlowStart, option: DFlowStartOption, view: DFlowStartView,
        placeHolderOption: {},
        initSize: {w: 70, h: 30},//被拖入时的初始化尺寸
        initOption: flowStartInitOption,
        getTypeOption: flowStartGetTypeOption,
    }

    compMap["flow.end"] = {
        label: "结束", component: DFlowEnd, option: DFlowEndOption, view: DFlowEndView,
        placeHolderOption: {},
        initSize: {w: 70, h: 30},//被拖入时的初始化尺寸
        initOption: flowEndInitOption,
        getTypeOption: flowEndGetTypeOption,
    }

    compMap["flow.rect"] = {
        label: "操作节点", component: DFlowRect, option: DFlowRectOption, view: DFlowRectView,
        placeHolderOption: {},
        initSize: {w: 100, h: 50},//被拖入时的初始化尺寸
        initOption: flowRectInitOption,
        getTypeOption: flowRectGetTypeOption,
    }
    compMap["flow.diamond"] = {
        label: "分支", component: DFlowDiamond, option: DFlowDiamondOption, view: DFlowDiamondView,
        placeHolderOption: {},
        initSize: {w: 100, h: 50},//被拖入时的初始化尺寸
        initOption: flowDiamondInitOption,
        getTypeOption: flowDiamondGetTypeOption,
    }
}

export {registerFlowComponent}
